<?php
class AvatarForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl 	= new MHDEV_View_Helper_BaseUrl();
    	$settings	= Zend_Registry::get('settings');
    	$translate	= Zend_Registry::get('lang');
    	
        parent::__construct($options);
        
        $this->setName('avatar');

        // file
        $file = new Zend_Form_Element_File('upload');
        $file->setLabel($translate->_('form_profile_avatar'));
		$file->setDescription($translate->_('form_profile_davatar'));
		$file->addValidator('Count', false, 1);
		$file->addValidator('Extension', false, 'jpg,png,gif,jpeg');
		$file->setDestination('upload/temp');

		// delete
		$delete = new Zend_Form_Element_Checkbox('is_deleted');
		$delete->setLabel($translate->_('form_profile_avatar_delete'));
		$delete->setDescription($translate->_('form_profile_avatar_ddelete'));
		
        // Submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($translate->_('form_save'));
        
        $this->addElements(array($file, $delete, $submit));
    }
}  
?>